package com.eaoogle.provider2.service;

import com.alibaba.dubbo.config.annotation.Service;
import com.eaoogle.appi.entity.User;
import com.eaoogle.appi.service.IHelloService;
import org.springframework.stereotype.Component;

import java.util.ArrayList;
import java.util.List;

@Service
@Component
public class IHelloImpl implements IHelloService {
    @SuppressWarnings("serial")
    private List<User> users = new ArrayList<User>(){{
        add(new User("熊大", 1,"123"));
        add(new User( "熊二",1, "234"));
        add(new User( "熊三",1, "456"));
    }};
    @Override
    public String getName(String name) {
        return "service2:"+name;
    }

    @Override
    public List<User> findall() {
        return users;
    }
}
